<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		var name = "北京";
		var name1 = "广州";
		var name2  = "东莞";

		// 数组：数据集合（由相关数据组成数据集合）
		// 
		var arr = ['北京','广州','东莞'];


		// arr[100] ="珠海";
		// var arr = [];

		// arr[0] = "北京";
		// arr[1] = "上海";

		// 角标，下标，索引

		// document.write(arr[100]);

		var arr = [45,2,2,543,52,231];

		var sum = 0;

		for (var i = 0; i < arr.length; i++) {

			sum +=arr[i];

		}
	   
	   	for(var a in arr){
	   		sum +=arr[a];
	   	}

		document.write(sum);

		// 多维数组

		var arr1 = [34,[5,63,423],45,[546,46,[34,[45,67,88]]],5,345,34];

		console.log(arr1[3][2][1][2]);
	</script>
</head>
<body>
	
</body>
</html>